package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;

public class ShopQuery extends BaseQuery{
	
	private String sName;
	
	private Long companyCode;
	
	//private List<Integer> companyList;
	
	public ShopQuery() {
		super("Shop");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(sName)) {
			AddWhere("o.sName like ?", "%" + sName + "%");
		}
		
		if (companyCode!=null) {
			AddWhere("o.sysCode.iId = ?", companyCode);
		}
		
//		if(companyList!=null && companyList.size()>0){
//			StringBuffer sb=new StringBuffer();
//			sb.append("o.sysCode.iId in (");
//			for(int i=0;i<companyList.size();i++){
//				sb.append(companyList.get(i));
//				if(i<companyList.size()-1){
//					sb.append(",");
//				}
//			}
//			sb.append(")");
//			AddWhere(sb.toString());
//		}
	}

	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}
	
	public String getSName() {
		return sName;
	}

	public void setSName(String sName) {
		this.sName = sName;
	}

	public Long getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(Long companyCode) {
		this.companyCode = companyCode;
	}

//	public List<Integer> getCompanyList() {
//		return companyList;
//	}
//
//	public void setCompanyList(List<Integer> companyList) {
//		this.companyList = companyList;
//	}	
}
